#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <sstream>
#include <iomanip>
using namespace std;

struct BigInteger{
    const static int BASE = (int)1e8;
    const static int WIDTH = 8;

    vector<int> v;

    BigInteger(const int x = 0) {*this = x;}
    BigInteger(const string x){*this = x;}
    BigInteger& operator =(const int x){
        v.clear();
        v.push_back(x);
        return *this;
    }
    BigInteger& operator = (const string &x){
        v.clear();
        int size = ((int)x.size()-1)/WIDTH + 1;
        int end = (int)x.size(), begin = max(0, end-WIDTH);
        while(size--){
            stringstream ss(x.substr(begin, end-begin));
            int t; ss >> t; v.push_back(t);
            end -= WIDTH;
            begin = max(0, end-WIDTH);
        }
        return *this;
    }
    friend istream& operator >> (istream &in, BigInteger &x){
        string s;
        if(cin >> s) x = s;
        return in;
    }
    void DeleteZero(){
        int cnt = 0;
        for (auto i = v.rbegin();  i!= v.rend(); ++i) {
            if(*i == 0) ++cnt;
            else break;
        }
        v.resize(v.size()-cnt);
    }
    friend ostream& operator << (ostream &out, BigInteger &x){
        out << x.v.back();
        for (int i = (int)x.v.size()-2; i >=0 ; --i) {
            out << setfill('0') << setw(8) << x.v[i];
        }
        return out;
    }
    friend bool operator <(const BigInteger &a, const BigInteger &b){
        return a.v.size() < b.v.size()
            ||(a.v.size() == b.v.size() && a.v.back() < b.v.back());
    }
    friend BigInteger operator +(BigInteger &a, BigInteger &b){
        BigInteger res;
        res.v.clear();
        int c = 0;
        int i=0;
        while(i<a.v.size() || i<b.v.size() || c!=0){
            if(i<a.v.size()) c += a.v[i];
            if(i<b.v.size()) c += b.v[i];
            res.v.push_back(c%BASE);
            c /= BASE;
            ++i;
        }
        res.DeleteZero();
        return res;
    }
    friend BigInteger operator -(BigInteger &a, BigInteger &b){
        BigInteger res;
        res.v.clear();
        int c = 0;
        int i=0;
        bool neg = false;
        if(a<b) {swap(a,b); neg = true;}
        bool carry = false;
        while(i<a.v.size()){
            c = a.v[i];
            if(i<b.v.size()) c -= b.v[i];
            if(carry) c-=1;
            if(c<0){
                carry = true;
                c+= BASE;
            }
            else carry = false;
            if(neg && i==a.v.size()-1) res.v.push_back(-c);
            else res.v.push_back(c);
            ++i;
        }
        res.DeleteZero();
        return res;
    }


};

int main() {
    ios_base::sync_with_stdio(false);cin.tie(nullptr);
    BigInteger a, b, c;
    cin >> a >> b;
    c = a-b;
    cout << c;
    return 0;
}